package com.graduation_design.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

/**
 * @TableName app_user
 */
@TableName(value ="app_user")
@Data
public class AppUser implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id;

    private String username;

    // @JsonIgnore可以让spring把数据格式化成json时候忽略该字段，这样前端就不会有密码的字段信息了。
    @JsonIgnore
    private String password;

    private String tel;

    private LocalDateTime created;

    private LocalDateTime updated;

    private String avatar;

    private LocalDateTime lastLogin;

    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}